//
//  ClienteDVStaticViewController.h
//  iTeVe
//
//  Created by Pedro Gonzalez on 08/02/14.
//  Copyright (c) 2014 SISI Software. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Cliente.h"
#import "BSKeyboardControls.h"


@class ClienteDVStaticViewController;

@protocol ClienteDVStaticViewControllerDelegate <NSObject>

- (void)clienteDVStaticViewControllerDidCancel:(ClienteDVStaticViewController *)controller;
- (void)clienteDVStaticViewController:(ClienteDVStaticViewController *)controller didEditCliente:(Cliente *)cliente;
- (void)clienteDVStaticViewController:(ClienteDVStaticViewController *)controller didAddCliente:(Cliente *)cliente;

@end


@interface ClienteDVStaticViewController : UITableViewController 
{

    UIPickerView *pagamentiPicker;
    UIPickerView *listiniPicker;
    UIPickerView *agentiPicker;
    UIPickerView *trasportoPicker;
    UIPickerView *banchePicker;
    UIPickerView *esenzioniIvaPicker;
    UIToolbar    *accessoryView;

//    NSObject<ClienteDVStaticViewControllerDelegate> *delegate;
    
}



@property (nonatomic, weak) NSObject<ClienteDVStaticViewControllerDelegate> *delegate;

- (IBAction)cancel:(id)sender;
- (IBAction)done:(id)sender;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *btnAnnulla;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *btnConferma;


@property (nonatomic, strong) IBOutlet UILabel *modelLabel;

@property (weak, nonatomic) IBOutlet UILabel *lblRagioneSociale;
@property (weak, nonatomic) IBOutlet UILabel *lblIndirizzo;
@property (weak, nonatomic) IBOutlet UILabel *lblCapCittaProvincia;
@property (weak, nonatomic) IBOutlet UILabel *lblNazione;
@property (weak, nonatomic) IBOutlet UILabel *lblTelefonoFaxCell;
@property (weak, nonatomic) IBOutlet UILabel *lblEmailSitoWeb;
@property (weak, nonatomic) IBOutlet UILabel *lblPartitaIvaCodiceFiscale;
@property (weak, nonatomic) IBOutlet UILabel *lblSconti;
@property (weak, nonatomic) IBOutlet UILabel *lblListino;
@property (weak, nonatomic) IBOutlet UILabel *lblAgente;
@property (weak, nonatomic) IBOutlet UILabel *lblTrasporto;
@property (weak, nonatomic) IBOutlet UILabel *lblPagamento;
@property (weak, nonatomic) IBOutlet UILabel *lblBanca;
@property (weak, nonatomic) IBOutlet UILabel *lblEsenzioneIva;
@property (weak, nonatomic) IBOutlet UILabel *lblNota;

@property (nonatomic, strong) IBOutlet UITextField *tfRagioneSociale;
@property (nonatomic, strong) IBOutlet UITextField *tfIndirizzo;
@property (nonatomic, strong) IBOutlet UITextField *tfCap;
@property (nonatomic, strong) IBOutlet UITextField *tfCitta;
@property (nonatomic, strong) IBOutlet UITextField *tfProvincia;
@property (nonatomic, strong) IBOutlet UITextField *tfNazione;
@property (nonatomic, strong) IBOutlet UITextField *tfTelefono;
@property (nonatomic, strong) IBOutlet UITextField *tfFax;
@property (nonatomic, strong) IBOutlet UITextField *tfCellulare;
@property (nonatomic, strong) IBOutlet UITextField *tfEmail;
@property (nonatomic, strong) IBOutlet UITextField *tfSitoWeb;
@property (nonatomic, strong) IBOutlet UITextField *tfPartitaIva;
@property (nonatomic, strong) IBOutlet UITextField *tfCodiceFiscale;
@property (nonatomic, strong) IBOutlet UITextField *tfSc1;
@property (nonatomic, strong) IBOutlet UITextField *tfSc2;
@property (nonatomic, strong) IBOutlet UITextField *tfSc3;
@property (nonatomic, strong) IBOutlet UITextField *tfSc4;
@property (nonatomic, strong) IBOutlet UITextField *tfListino;
@property (weak, nonatomic) IBOutlet UITextField *tfListinoDescrizione;
@property (nonatomic, strong) IBOutlet UITextField *tfAgente;
@property (weak, nonatomic) IBOutlet UITextField *tfAgenteDescrizione;
@property (nonatomic, strong) IBOutlet UITextField *tfTrasporto;
@property (weak, nonatomic) IBOutlet UITextField *tfTrasportoDescrizione;
@property (nonatomic, strong) IBOutlet UITextField *tfPagamento;
@property (weak, nonatomic) IBOutlet UITextField *tfPagamentoDescrizione;
@property (nonatomic, strong) IBOutlet UITextField *tfBanca;
@property (weak, nonatomic) IBOutlet UITextField *tfBancaDescrizione;
@property (nonatomic, strong) IBOutlet UITextField *tfEsenzioneIva;
@property (weak, nonatomic) IBOutlet UITextField *tfEsenzioneIvaDescrizione;
@property (nonatomic, strong) IBOutlet UITextView *tfNota;
@property (nonatomic, strong) UITextField *activeField;

@property (nonatomic, strong) NSMutableArray *pagamenti;
@property (nonatomic, strong) NSMutableArray *listini;
@property (nonatomic, strong) NSMutableArray *agenti;
@property (nonatomic, strong) NSMutableArray *trasporti;
@property (nonatomic, strong) NSMutableArray *banche;
@property (nonatomic, strong) NSMutableArray *esenzioniiva;
@property (nonatomic, assign) NSInteger selectedIndex;
@property (nonatomic, readonly) UIPickerView *pagamentiPicker;
@property (nonatomic, readonly) UIToolbar *accessoryView;

- (IBAction)selezionaPagamento:(id)sender;

@property (nonatomic, strong) Cliente *modelCliente;

@property (nonatomic) BOOL nuovo;


@end
